package com.chezhujie.www.utils;

import java.net.FileNameMap;
import java.net.URLConnection;

/**
 * 判断是否是图片，如果是则返回 image/jpeg
 * Created by 汤伟杰 on 2017/6/2.
 */
public class FileManage {
    public static String getMimeType(String fileName) {
        FileNameMap fileNameMap = URLConnection.getFileNameMap();
        String type = fileNameMap.getContentTypeFor(fileName);
        return type;
    }
}
